from flask_login import LoginManager
from application.models.model import User

login = LoginManager()


# 3、加载用户, login_required 需要查询用户信息
@login.user_loader
def user_loader(user_id: str):
    return User.query.get(user_id)
